Lab - 3: Habit Tracker App

By Drashya Patel on 2024-12-12T11:39-05:00

Tags: No Tags

Android Studio Lab Assignment - Habit Tracker App

Objective

To design and implement a multi-screen Android application using Android Studio. The app serves as a Habit Tracker, allowing users to monitor their habits and track progress through user inputs and visual feedback.


Lab Tasks

1. App Design and Development

  • Developed a Habit Tracker app with the following features:
    • Screen 1: Introductory screen with a welcome message and a button to navigate to the tracker screen.
    • Screen 2: Functional screen for habit tracking, including:
      • Input fields for habit name.
      • Radio buttons for selecting tracking frequency (daily/weekly).
      • A seek bar for progress tracking.
      • A "Mark as Complete" button to update progress.
    • Integrated Text-to-Speech (TTS) functionality to provide auditory feedback.

2. Input Types Used

The app incorporates the following input types:

  1. EditText: For entering the habit name.
  2. RadioButtons: To select tracking frequency (daily or weekly).
  3. SeekBar: For visual representation of progress.
  4. Button: To navigate between screens and submit inputs.
  5. Text-to-Speech (TTS): To provide auditory feedback upon completing a habit.

3. App Functionality

  • Screen Navigation:
    • Used Intents to navigate between the welcome screen and the tracker screen.
  • Habit Tracking:
    • Users can input their habit name and select a tracking frequency.
    • Progress is tracked using a seek bar and updated dynamically.
  • Text-to-Speech Feedback:
    • When a habit is completed, the app provides encouraging auditory feedback.
  • Progress Calculation:
    • The app calculates progress based on user input and displays it visually and as text.

4. Challenges Faced

  • RadioButton Behavior:
    • Struggled with making radio buttons dynamic for toggle selection.
  • Initial Environment Setup:
    • Found Android Studio overwhelming initially but became more comfortable as the project progressed.

What I Did

  1. Setup and Navigation:
    • Set up Android Studio and installed an external emulator (BlueStacks) for testing.
    • Designed the app layout using XML for two screens.
    • Implemented Intents to enable smooth navigation between screens.
  2. Implemented Functionalities:
    • Added user input fields, progress tracking, and TTS feedback.
    • Wrote logic for progress calculation and habit completion.
  3. Debugging and Testing:
    • Tested the app on the Android Studio emulator and external emulator.
    • Debugged issues with RadioButtons and ensured the app was stable.

Reflection

This assignment was a great learning opportunity. Initially, Android Studio was overwhelming with its extensive features and tools. However, as I progressed, I became more comfortable with the environment. Implementing features such as user inputs, progress tracking, and Text-to-Speech was fascinating, as they are commonly used in daily apps.

Challenges like managing RadioButton behavior for toggle selection were frustrating but provided valuable insights into debugging and problem-solving. This project gave me a good understanding of the effort required to build functional and user-friendly apps. Overall, I feel more confident using Android Studio compared to my first project.


Screenshots

  1. Welcome Screen:

    • Includes a welcome message and a "Start Tracking" button. Welcome Screen
  2. Tracker Screen:

    • Displays input fields, progress tracking, and TTS feedback functionality. Tracker Screen

    Image 3 Image 4 Image 5 Image 6


Conclusion

This lab demonstrated the process of building a multi-screen Android app using Android Studio. It improved my understanding of UI design, input handling, and navigation. The challenges faced and resolved during development have significantly boosted my confidence in working with Android Studio.